# i = 1
# sum = 0
# while i <= 100:
#     sum = sum + i
#     i += 1
# print(sum)

import random
num = random.randint(1, 100)
count = 0
flag = True
while flag:
    guess = int(input("请猜数字："))
    count += 1
    if guess == num:
        print("恭喜你猜对了，正确数字%d，猜了%d次" % (num, count))
        flag = False
    else:
        if guess > num:
            print("大了")
        else:
            print("小了")